<?php
define('EmpireCMSAdmin','1');
require_once("../class/connect.php");
require_once("../class/db_sql.php");
require_once("../class/functions.php");
require_once("../class/user.php");
require_once("../class/page_obj.php");
require_once("../class/say.php");

$link=db_connect();
$empire=new mysqlquery();
$action	=$_REQUEST['act'];
$page	=$_REQUEST['page'];


/*
$page=new page_obj($page,array("itemnum"=>10,"border"=>8));
$page_start=$page->arr_temp['start'];
$page_end=$page->arr_temp['end'];
$page_current=$page->current_page;
$limit_str=$page->get_limit_str();

*/
switch($action){
	case "add_comment"://添加状态
		$act_id	=$_REQUEST['act_id']?$_REQUEST['act_id']:$_REQUEST['app_id'];
		$content=$_REQUEST['content'];
		$type	=$_REQUEST['type'];
		$app_db="phome_jat_comment";
		if(!$lguserid){show_error("您还未登录，不能发表！");}
		if(!$act_id){show_error("系统错误，发帖失败");}
		$arr=array(
					"app_id"=>(int)$act_id,
					"uid"=>$lguserid,
					"content"=>enSafeContent($content),
					"type_id"=>$type?$type:ACT_CMMNT_ID,
					"status"=>"1",
					"time"=>time()
				);
		//var_dump($arr);
		if(DbDataAddOrEdit($app_db,$arr,false)){
			show_error("ok",1);
		}else{
			show_error("系统错误！");
		}
	break;
}
show_error("no match");
?>